#pragma once

#include <iostream>
#include <onnxruntime_cxx_api.h>
#include <cpu_provider_factory.h>

namespace myHcn {

class Hcn
{
public:
    Hcn(const char* modelFile);
    ~Hcn();

    void printTensorValue(Ort::Value &value, std::string valueInfo = {});
    Ort::Value *run(float tfValue);
    void shotOverCallback();
    std::vector<Ort::Value> *getOutputTensors();

private:
    void addName(std::vector<const char*> &names, char *name);

    Ort::RunOptions run_options;
    Ort::Session session;
    Ort::MemoryInfo memory_info;
    Ort::AllocatorWithDefaultOptions allocator;

    std::vector<Ort::Value> input_tensors;
    std::vector<Ort::Value> output_tensors;
    std::vector<const char*> input_names;
    std::vector<const char*> output_names;

    bool isReRun = true;
};

}   // namespace myHcn
